﻿using SUNRPA.CONTROLS.IMPL.util;
using System.Collections.Concurrent;
/// <summary>
/// Excel有Office和Wps目前只支持Office后期加入Wps支持。
/// </summary>
namespace SUNRPA.CONTROLS.IMPL.domain.flowItemParam {
    [Serializable]
    public class CopyExcelNParam:BaseParam {
        private string copyObject = "{excelObject}";
        //写入方式0区域，1列，2行，3单元格，4已使用区域
        private int copyWay = 0;
        private string row = "";
        private string column = "";
        private string endRow = "";
        private string endColumn = "";
        private string sheetName = "";
        public int CopyWay {
            get => copyWay; 
            set { 
                copyWay = value;
                NotifyPropertyChanged("CopyWay");
            }  
        }
        public string CopyObject {
            get => copyObject; 
            set { 
                copyObject = value;
                NotifyPropertyChanged("CopyObject");
            }  
        }
        public string EndRow {
            get => endRow; 
            set { 
                endRow = value;
                NotifyPropertyChanged("EndRow");
            }  
        }

        public string EndColumn {
            get => endColumn; 
            set { 
                endColumn = value;
                NotifyPropertyChanged("EndColumn");
            }  
        }
        public string Row {
            get => row; 
            set { 
                row = value;
                NotifyPropertyChanged("Row");
            }  
        }
        public string Column {
            get => column; 
            set { 
                column = value;
                NotifyPropertyChanged("Columns");
            }
}
        public string SheetName {
            get => sheetName; 
            set { 
                sheetName = value;
                NotifyPropertyChanged("SheetName");
            }  
        }
        public string GetTranslateRange() {
            switch(this.copyWay) {
                case 0:
                    return "区域";
                case 1:
                    return "列";
                case 2:
                    return "行";
                case 3:
                    return "单元格";
                case 4:
                    return "已使用区域";
                default : return "区域";
            }
        }
        public string GetTranslateItemInfo() {
            switch(this.copyWay) {
                case 0:
                    return $"矩形范围区域：起始单元格(第{row}行,第{column}列),结束单元格(第{endRow}行，第{endColumn}列)";
                case 1:
                    return $"第{column}列的内容";
                case 2:
                    return $"第{row}行的内容";
                case 3:
                    return $"单元格(第{row}行,第{column}列)的内容";
                case 4:
                    return "已使用区域的内容";
                default : return "";
            }
        }
    }
}
